package com.tcxhb.job.dao.repository;

import com.tcxhb.job.dao.dataobject.JobInfoDO;
import com.tcxhb.job.dao.dataobject.query.JobInfoQuery;
import com.tcxhb.job.dao.dataobject.query.JobScanQuery;
import com.tcxhb.job.common.model.PageResponse;

import java.util.List;
/**
* author:auto.generator
* time: 2023-11-02
*/
public interface JobInfoRepository {

    /**
    * 创建对象
    * @param jobInfoDO
    * @return
    */
    Long create(JobInfoDO jobInfoDO);

    /**
    * 根据ID删除
    * @param id
    * @return
    */
    boolean deleteById(Long id);

    /**
    * 根据ID更新
    * @param jobInfoDO
    * @return
    */
    boolean updateById(JobInfoDO jobInfoDO);

    /**
    * 根据ID查询
    * @param id
    * @return
    */
    JobInfoDO queryById(Long id);

    /**
    * 分页查询
    * @param query
    * @return
    */
    PageResponse<JobInfoDO> page(JobInfoQuery query);

    /**
    * 列表查询
    * @param query
    * @return
    */
    List<JobInfoDO> list(JobInfoQuery query);

    /**
     * 任务扫描
     * @param query
     * @return
     */
    List<JobInfoDO> scan(JobScanQuery query);

    boolean freshNextTime(JobInfoDO update);
}
